<template>
  <el-col :span="12" id="menuList">
    <el-menu
      default-active="2"
      class="el-menu-vertical-demo"
      @open="handleOpen"
      @close="handleClose"
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b">
      <el-submenu index="1">
        <template #title>
          <i class="el-icon-location"></i>
          <span>系统管理</span>
        </template>
        <el-menu-item index="1-1">
          <router-link :to="{path:'/list/table',query:{name:'zd',age:18}}">用户管理</router-link>
        </el-menu-item>
        <el-menu-item index="1-2">
          <router-link :to="{name:'Table',params:{age:12}}">权限管理</router-link>
        </el-menu-item>
        <el-menu-item index="1-3">
          <router-link to="/role-management">角色管理</router-link>
        </el-menu-item>
      </el-submenu>
    </el-menu>
    <router-view></router-view>
  </el-col>
</template>

<script>
export default {
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    }
  },mounted() {
    console.log(this.$route.query);
    console.log(this.$route.params);
  }
};
</script>

<style scoped>
#menuList{
  width: 202px;
  height: 500px;
  position: fixed;
  border: 1px solid red;
  margin-top: -100px;
}
</style>
